home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ Jul 89 / W0061-TML⁄MacApp, not qu-Jul89 < prev    next >
Encoding:
Text File  |  1989-07-18  |  2.7 KB  |  79 lines  |  [TEXT/GEOL]

  1. Item    3248621                         13-July-89        11:06
  2.  
  3. From:   D2086                           Efficient Field Svc, C Faith, PRT
  4.  
  5. To:     MACAPP.TECH$                    MACAPP Tech
  6.  
  7. cc:     D0107                           TML Systems Suppt,Leonard, PRT
  8.  
  9. Sub:    TML/MacApp,  not quite useable
  10.  
  11. I have some concern with TML Pascal and MacApp that I would like to see
  12. resolved.
  13.  
  14. I would love to use TMLPascal all the time, It is blazing fast compared to MPW
  15. Pascal.  I think the Tom Leonard et al. have done a fine job with it.  With a
  16. few small exceptions that actually impact its usefulness with MacApp
  17. considerably.
  18.  
  19. These concerns relate to MacApp compatibility.  I know that you can get
  20. TMLPascal to compile MacApp itself (I have done so), but can you get it to
  21. compile any programs that you have written using MacApp.  No, not without
  22. jumping through a lot of hoops.
  23.  
  24. I am not concerned with the changes that need to be made to the MacApp source,
  25. these are not really that big of a deal. (Although I wonder why there are any
  26. compatibilities, seems they would sell more If they where 100% absolutely
  27. positively compatible)
  28.  
  29. My big concern is that it does not like things like the following:
  30.  
  31. TEditText(aMyView.FindSubView('edt1')).GetText(theText);
  32.  
  33. It claims this is not proper pascal. It wants you to assign the value of
  34. FindSubView to an abject and then have that object call its GetText like this;
  35.  
  36. VAR
  37.     anEditText:     TEditText;
  38.  
  39. anEditText := TEditText(aMyView.FindSubView('edt1'));
  40. anEditText.GetText(theText);
  41.  
  42. This is much messier than the original way, which is used in all the example
  43. programs.
  44.  
  45. To have a function without an assignment may not be proper pascal but it sure
  46. seems that it should be proper object pascal.
  47.  
  48. What should a function do anyway?  Should it not be useable whereever a
  49. variable of the type that it returns is useable.  You can do this:
  50.  
  51. Writeln('4 + 5 = ',SUM(4,5));
  52.  
  53. If sum is a function that returns the sum.
  54.  
  55. TML's restricted use of function return values is crippling and predates Object
  56. Pascal when there was no utility in a function return value existing alone.
  57. You cannot do this:
  58.  
  59. SUM(4,5);
  60.  
  61. if SUM is a function.  This is not the same as
  62.  
  63. TEditText(aMyView.FindSubView('edt1')).GetText(theText);
  64.  
  65. where the function is not really just standing there but is used to implement a
  66. method GetText.
  67.  
  68. In summary I WANT to use TML Pascal, but I will not because of this.  I don't
  69. really think it would be that difficult to change this either, relaxing the
  70. syntax checking for this would be relatively trivial compared to the obviously
  71. immense work involved in writing this otherwise excellent compiler.
  72.  
  73. If we can convince Tom that this change would be good then perhaps we all can
  74. use this good tool.
  75.  
  76. Curtis Faith
  77.  
  78.  
  79.